#pragma once
#include "material.h"
#include "MaterialInstance.h"

namespace RenderSystem
{
	class D3DMaterial :
		public Material
	{
	public:
		D3DMaterial( const String& strMaterialID, MaterialManager& rMatMgr );
		virtual ~D3DMaterial(void);

		//Resource interface
		virtual bool Load( const String& strPath );
		virtual bool Unload( void );

	protected:

		virtual D3DMaterialInstance* _CreateInstanceImpl( const String& strInstanceId );

	private:

		LPD3DXEFFECT	m_D3DEffect;
	};

	class D3DMaterialInstance :
		public MaterialInstance
	{
	public:
		D3DMaterialInstance( void );
		virtual ~D3DMaterialInstance( void );

		virtual D3DMaterial* GetMaterial( void ) const;
	};

}